<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改编排 ')" />
    <th:block th:include="include :: datetimepicker-css" />
    <style>
        .radio label{
            padding-left: unset;
        }
    </style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-register-edit" th:object="${jsRegister}">
        <input name="id" th:field="*{id}" type="hidden">

        <div class="form-group">
            <label class="col-sm-3 control-label">选手：</label>
            <div class="col-sm-8">
                <input name="playerName" th:field="*{playerName}" class="form-control" type="text"  autocomplete="off" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">场地：</label>
            <div class="col-sm-8">
                <select name="placeId" th:field="*{placeId}" id="select2_place" class="form-control">
                    <option th:each="place : ${placeList}" th:text="${place.name}" th:value="${place.id}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">轮次：</label>
            <div class="col-sm-8">
                <input name="session" th:field="*{session}" class="form-control" type="text"  autocomplete="off">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">序号：</label>
            <div class="col-sm-8">
                <input name="odr" th:field="*{odr}" class="form-control" type="text"  autocomplete="off">
            </div>
        </div>

    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    var prefix = ctx + "js/register";

    $("#form-register-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            var registerId = $("input[name='id']").val();
            var placeId = $("select[name='placeId']").val();
            var session = $("input[name='session']").val();
            var odr = $("input[name='odr']").val();
            $.operate.save(prefix + "/editArrange", {registerId: registerId, placeId: placeId, session: session, odr: odr});
        }
    }
</script>
</body>
</html>